<%@page import="youleche.com.caches.CacheFactory"%>
<%@page import="youleche.com.model.MVehicleInfo"%>
<%@page import="java.util.List"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<div class="main">
				<div class="mainCenter" id="mainCenter">
        <!-- 信息显示开始 -->			
        <%
        	List<MVehicleInfo> vehicleInfos = null;
        	try{
        		
        		vehicleInfos = (List<MVehicleInfo> )CacheFactory.getVehicleCache().getCache();
        	}catch(Exception ex){
        		
        	}
        %>
				<%
				if(vehicleInfos != null && vehicleInfos.size() > 0){
			       %> <input type="hidden" id="hidNextInfoSize" value="<%=vehicleInfos.size()%>"/><%
					for(int i = 0; i < vehicleInfos.size(); i++) {	
						String zengsong = "";
						if(!"".equals(vehicleInfos.get(i).getA7()) && null != vehicleInfos.get(i).getA7() ) {
							
                	  		if(vehicleInfos.get(i).getA7().contains("0")){
                	  			zengsong += "雨衣、";
                	  		}
                	  		
                	  		if(vehicleInfos.get(i).getA7().contains("1")){
                	  			zengsong += "锁、";
                	  		}

							if(vehicleInfos.get(i).getA7().contains("2")){
                	  			zengsong += "充电器、";
                	  		}
							 if(vehicleInfos.get(i).getA7().contains("3")){
                	  			zengsong += "头盔、";
                	  		}
							 
							if(vehicleInfos.get(i).getA7().contains("4")){
                	  			zengsong += "座套、";
                	  		}
							
							if(zengsong.contains("、")){
								zengsong = zengsong.substring(0, zengsong.length() - 1);
							}
							
							if("".equals(zengsong) || zengsong == null || vehicleInfos.get(i).getA7().contains("6")){
								zengsong = "亲美美，商家太吝啬了，没有可赠送的物件~~~";
							}
							
							
								
						}
				%>
					<div class="mainCenterArea" id="mainCenterDiv<%=i%>">
						<div class="mainCenterAreaImg">
						<%
							String imgUrl = vehicleInfos.get(i).getImageId();
							if("0".equals(imgUrl)){
								imgUrl = "nopic_300_300.jpg";
							}
						%>
							<img style="border:0px;width:300px;height:300px;" src="vehicleImage/<%=imgUrl.replace("300_300", "normal") %>" />
						</div>
						<div class="mainCenterAreaDesc">
							<div
								style="float: left; width: 385px; color: #333333; font-weight: bold; font-size: 20px; height: 50px; margin: 5px 0px 0px 15px; vertical-align: middle;">
								【<%= vehicleInfos.get(i).getVehicleName() %>】<%= vehicleInfos.get(i).getA1() %></div>
							<div
								style="float: left; width: 85px; height: 50px; margin: 5px 0px 0px 15px; color: #47B689;">
								<!-- [<a
									style="color: #47B689; font-size: 12px; text-decoration: underline;">查看地图</a>] -->
							</div>
							<div
								style="text-align:right;float: left; width: 100px; height: 25px; font-weight: bold; color: #666; font-size: 14px;">
								店铺地址：</div>
							<div
								style="float: left; width: 400px; height: 25px; color: #666;">
								<%= vehicleInfos.get(i).getA2() %></div>
							<div
								style="text-align:right;float: left; width: 100px; height: 25px; font-weight: bold; color: #666; font-size: 14px;">
								电池：</div>
							<div
								style="float: left; width: 200px; height: 25px; color: #666;">
								<%= vehicleInfos.get(i).getBatterySize() %>V<%= vehicleInfos.get(i).getElectricitySize() %>A</div>
							<div style="float: right; width: 200px; height: 235px;">
								<div
									style="float: left; width: 70px; height: 35px; text-align: right; font-size: 14px;">发布时间：</div>
								<div
									style="float: left; width: 130px; height: 35px; text-align: left;"><%= vehicleInfos.get(i).getAddTime() %></div>
								<div style="float: left; width: 200px; height: 140px;">
									<div
										style="float: left; width: 50px; height: 140px; text-align: right; line-height: 90px; vertical-align: text-top; font-size: 20px; font-style: italic; color: #444;">￥</div>
									<div
										style="float: left; width: 150px; height: 140px; text-align: left; line-height: 110px; font-size: 50px; color: #F60;"><%= vehicleInfos.get(i).getPrice() %></div>
									
								</div>
								<div style="float: left; width: 200px; height: 60px;">
									<a class="detail-btn1" onclick="contactSeller('<%= vehicleInfos.get(i).getVehicleId()%>');">联系店主</a>
								</div>
							</div>
							<div
								style="text-align:right;float: left; width: 100px; height: 25px; font-weight: bold; color: #666; font-size: 14px;">
								蓄电行程：</div>
							<div
								style="float: left; width: 200px; height: 25px; color: #666;">
								<%= vehicleInfos.get(i).getWorkLength() %>km</div>
							<div
								style="text-align:right;float: left; width: 100px; height: 25px; font-weight: bold; color: #666; font-size: 14px;">
								最大速度：</div>
							<div
								style="float: left; width: 200px; height: 25px; color: #666;">
								<%=vehicleInfos.get(i).getMaxSpeed() %>km/h</div>
							<div
								style=" vertical-align: middle;text-align:right;line-height:25px;float: left; width: 100px; height: 25px; font-weight: bold; color: #666; font-size: 14px;">
								赠送：</div>
							<div
								style="float: left; width: 200px; height: 100px;line-height:25px; color: #666;">
								<%= zengsong  %></div>
							<div style="float: left; width: 300px; height: 50px">
								<a class="detail-btn" onclick="addShopVehicle('<%=vehicleInfos.get(i).getVehicleId()%>');">加入收藏车</a> <a
									class="detail-btn" href="che.do?id=<%=vehicleInfos.get(i).getVehicleId()%>&action=1" target="_blank">车辆详情</a>
							</div>
						</div>
					</div>
				<%}}%>
			<!-- 信息显示结束 -->		
				</div>
				<%@include file="home/rent.jsp" %>
				<%@include file="home/problem.jsp" %>
			<div class="gouwuche"  onclick="forwardShop();">
				<img src="image/gouwuche.jpg" alt="进去收藏车"/>
				<br/>
				(<span id="numShop">0</span>)辆车
			</div>
			</div>
